package test1;

import java.util.HashSet;

public class Hash {

	public static void main(String[] args) {
		HashSet<Book> h =  new HashSet<Book>();
		
		
	}

	public boolean equals(Object obj){
		if (obj instanceof Book) {
			Book book = (Book)obj;
			if(book.name.equals("name")&&book.anthor.equals("anthor"));
			return true;
		}
		return false;
	}
	public int hashCode(Book book){
		String s = book.name + book.anthor;
		return s.hashCode();
	}
}
